home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------
- //
- // This code is copyright 2001 by G5 Software.
- // Any unauthorized usage, either in part or in whole of this code
- // is strictly prohibited. Violators WILL be prosecuted to the
- // maximum extent allowed by law.
- //
- //-------------------------------------------------------------------
-
- class CDoubleHouseMesh_1
- {
- string MeshFile = "Models/B_Country_6.mesh";
- string SkinFile = "Models/B_Country_6.skin";
- }
-
- class CDoubleHouseMesh_2
- {
- string MeshFile = "Models/B_Country_7.mesh";
- string SkinFile = "Models/B_Country_7.skin";
- }
-
- class CDoubleHouseMesh_3
- {
- string MeshFile = "Models/B_Country_8.mesh";
- string SkinFile = "Models/B_Country_8.skin";
- }
-
- class CDoubleHouseMesh_4
- {
- string MeshFile = "Models/B_Country_9.mesh";
- string SkinFile = "Models/B_Country_9.skin";
- }
-
- class CDoubleHouseMesh_5
- {
- string MeshFile = "Models/B_House_d.mesh";
- string SkinFile = "Models/B_House_d.skin";
- }
-
- class CDoubleHouseStateControl extends CUnitLifeControl
- {
- void CDoubleHouseStateControl()
- {
- CUnitLifeControl(2500.0);
- m_DestroyPause = 20.0;
- m_ExplosionId = "EXPLID_BuildingExplosion";
- }
- }
-
- // Building without ground control (for use in villages)
- class CBaseDoubleHouse extends CBuilding, CUnitWithStateControl
- {
- array m_MeshClassNames = array(
- "CDoubleHouseMesh_1",
- "CDoubleHouseMesh_2",
- "CDoubleHouseMesh_3",
- "CDoubleHouseMesh_4",
- "CDoubleHouseMesh_5"
- );
-
- void CBaseDoubleHouse()
- {
- int MeshNumber = rand_int(m_MeshClassNames.size());
- InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
- CUnitWithStateControl("CDoubleHouseStateControl");
- }
- }
-
- // Single game object
- class CMountedDoubleHouse extends CBaseDoubleHouse
- {
- void CMountedDoubleHouse()
- {
- InitializeGroundControl();
- }
- }
-
- // Armed building
- class CArmedDoubleHouseGun extends CBaseWeaponDescriptor
- {
- int AmmoQuantity = -1;
- float BulletSpeed = 600.0;
- float FireDeviation = 0.02;
- string LinkJointName = "";
-
- string WeaponName = "Gun";
- float FireWeaponDelay = 0.1;
- bool IsAutotargeting = false;
- int AttachSlotNumber = 1;
- }
-
- class CGermanArmedDoubleHouseGun extends CArmedDoubleHouseGun
- {
- string BulletPatternId = "BULLETID_GermenArmedDHouseBullet";
- string SoundOnFire = "SOUNDID_ArmedHouseGunFireSound";
- }
-
- class CArmedDoubleHouseBehavior extends
- CBaseBehavior,
- CArmedDoubleHouseFireParameters
- {
- boolean CanMove = false;
-
- void CArmedDoubleHouseBehavior()
- {
- CBaseBehavior();
- }
- }
-
- class CArmedDoubleHouseFireParameters
- {
- boolean CanFire = true;
-
- int FirePeriod = 200; // ms
- int FirePeriodRandAdd = 100; // ms
-
- int ShootGunNum = 1;
-
- boolean BurstFire = true;
- int BurstTime = 2000; // ms
- int BurstTimeRandAdd = 1000; // ms
-
- int BurstDelay = 1000; // ms
- int BurstDelayRandAdd = 2000; // ms
-
- // radar
-
- boolean HasRadar = true;
-
- float MaxRadarDistance = 1500; // m
- float MinRadarDistance = 10; // m
-
- int UpdateRadarPeriod = 2000; // ms
- int UpdateRadarPeriodRandAdd = 1000; // ms
-
- boolean FireFlying = true;
- boolean FireGround = true;
- };
-
- class CBaseGermanArmedDoubleHouse extends
- CBaseDoubleHouse,
- CArmedUnit,
- CUnitWithBehavior
- {
- void CBaseGermanArmedDoubleHouse()
- {
- CreateStaticWeapon("Gun", "CGermanArmedDoubleHouseGun");
- InitializeVehicleBehavior("CArmedDoubleHouseBehavior");
- Core_AddClassificator("German");
- }
- }
-
- class CMountedGermanArmedDoubleHouse extends CBaseGermanArmedDoubleHouse
- {
- void CMountedGermanArmedDoubleHouse()
- {
- InitializeGroundControl();
- }
- }
-
-